package jhavelogger.data;

import com.maxmind.geoip.Location;

/**
 * A fake implementation of the GeoIP service. This class was created to aid
 * in testing. I'm still not sure how many lookups I can perform before the
 * GeoIP company gets upset. This will return the same dummy data for each
 * call.
 * 
 * @author Jared Schlicht
 *
 */
public class FakeIPLookup implements IPLookup {
    /**
     * Generates a fake location object. Only the currently required properties
     * are populated. Feel free to add more data here if you need it.
     * 
     * @param ip ip address to lookup
     * @return GeoIP location object
     */
    @Override
    public Location getIpLocation(String ip) {
	Location location = new Location();
	location.city = "Fake City";
	location.region = "AA";
	location.countryName = "United States";
	return location;
    }
}
